package com.itheima.stock.mapper;

import com.itheima.stock.pojo.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author HearTheSong
 * @description 针对表【sys_role(角色表)】的数据库操作Mapper
 * @createDate 2022-03-13 17:42:28
 * @Entity com.itheima.stock.pojo.SysRole
 */
@Mapper
public interface SysRoleMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysRole record);

    int insertSelective(SysRole record);

    SysRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysRole record);

    int updateByPrimaryKey(SysRole record);

    /*
        获取用户具有的角色信息
     */
    List<String> queryRolesById(@Param("uid") String id);

    /*
        获取所有角色信息
     */
    List<SysRole> queryAllRole();
}
